package ms.unicorn.erml.edit.policies;

import java.util.ArrayList;
import java.util.List;

import ms.unicorn.erml.handles.CompartmentCollapseHandleEx;

import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;

public class ResizableCompartmentEditPolicyEx extends
		ResizableCompartmentEditPolicy {
	/**
     * This method is used to get the collapse handle(s). Subclasses can
     * override to provide different collapse handles
     * 
     * @return a list of collapse handles
     */
    @SuppressWarnings({ "rawtypes", "unchecked" })
	protected List createCollapseHandles() {
        IGraphicalEditPart part = (IGraphicalEditPart) getHost();

        List collapseHandles = new ArrayList();
        collapseHandles.add(new CompartmentCollapseHandleEx(part));
        return collapseHandles;
    }
}
